/*
 * @Author: ljkt
 * @Version: 1.0
 * @Date: 2021-10-26 15:50:58
 * @LastEditors: ljkt
 * @LastEditTime: 2025-06-04 17:50:52
 * @Description:
 */

#ifndef _APP_COM_H__
#define _APP_COM_H__
typedef struct
{
    unsigned char head;
    unsigned char key_l8;
    unsigned char key_h8;
    unsigned char key_f_l8;
    unsigned char key_f_h8;
    signed char ReShuiTemp;
    signed char ReShuiTempl8;
    signed char LengShuiTemp;
    signed char LengShuiTempl8;
    unsigned char chekcsum;
} s_com_send_t;
typedef struct
{
    // BYTE1
    unsigned char Head;
    // BYTE2
    unsigned char BeepCnt : 4;
    unsigned char BeepEn : 1;
    unsigned char Byte1NC : 3;
    // BYTE3
    unsigned char BeepOnDiv10Ms;
    // BYTE4
    unsigned char BeepOffDiv10Ms;
    // BYTE5
    unsigned char COM1_Sz : 7;
    unsigned char COM1_NC : 1;
    // BYTE6
    unsigned char COM2_Sz : 7;
    unsigned char COM2_NC : 1;
    // BYTE7
    unsigned char COM3_Sz : 7;
    unsigned char COM3_NC : 1;
    // BYTE8
    unsigned char TongShuo : 2;
    unsigned char GaoWen : 2;
    unsigned char LX_Red : 2;
    unsigned char Lx_White : 2;
    // BYTE9
    unsigned char Tds : 2;
    unsigned char Warn : 2;
    unsigned char ChongXi : 2;
    unsigned char Wifi : 2;
    // BYTE10
    unsigned char KeyLvCha : 2;
    unsigned char KeyNingMong : 2;
    unsigned char KeyWenShui : 2;
    unsigned char KeyChangWen : 2;
    // BYTE11
    unsigned char KeyShuiLiang : 2;
    unsigned char KeyTongShuo : 2;
    unsigned char KeyYunDingZhi : 2;
    unsigned char KeyFeiShui : 2;
    // BYTE12
    unsigned char ReGuan : 2;
    unsigned char SheShiDu : 2;
    unsigned char KeyWaterOut_Red : 2;
    unsigned char KeyWaterOut_White : 2;

    // BYTE13
    unsigned char TbL : 2;
    unsigned char Life_Point : 2;
    unsigned char Right_Point : 2;
    unsigned char BYTE15_NC3 : 2;

    // BYTE14
    // unsigned char TempReShui;
    // BYTE15
    // unsigned char TempLengShui;
    // BYTE16

    // // BYTE16
    // unsigned char : 2;
    // unsigned char : 2;
    // unsigned char : 2;
    // unsigned char : 2;
    // // BYTE17
    // unsigned char : 2;
    // unsigned char : 2;
    // unsigned char : 2;
    // unsigned char : 2;
    // // BYTE18

    unsigned char CheckSum;
} s_com_recv_t;
typedef struct
{
    unsigned char TxFlag;
    unsigned char RxFlag;
    unsigned char RxCnt;
    unsigned char RxTimeOut;
    s_com_recv_t RecvDat;
    s_com_send_t SendDat;
} s_app_com_t;
extern Ram s_app_com_t gApp_Com;
void App_Com_Init(void);
void App_Com_Scan(void);
typedef struct
{
    unsigned char SZ1_SEGA;
    unsigned char SZ1_SEGB;
    unsigned char SZ1_SEGC;
    unsigned char SZ1_SEGD;
    unsigned char SZ1_SEGE;
    unsigned char SZ1_SEGF;
    unsigned char SZ1_SEGG;
    unsigned char SZ1_DP1;
    unsigned char Lx_Read;
    unsigned char Warn;
    unsigned char COM1_NC[2];

    unsigned char SZ2_SEGA;
    unsigned char SZ2_SEGB;
    unsigned char SZ2_SEGC;
    unsigned char SZ2_SEGD;
    unsigned char SZ2_SEGE;
    unsigned char SZ2_SEGF;
    unsigned char SZ2_SEGG;
    unsigned char SZ2_DP1;
    unsigned char GaoWen;
    unsigned char COM2_NC[3];

    unsigned char SZ3_SEGA;
    unsigned char SZ3_SEGB;
    unsigned char SZ3_SEGC;
    unsigned char SZ3_SEGD;
    unsigned char SZ3_SEGE;
    unsigned char SZ3_SEGF;
    unsigned char SZ3_SEGG;
    unsigned char COM3_ChongXi;
    unsigned char KeyChuShuiRed5;
    unsigned char KeyChuShuiWhite5;
    unsigned char COM3_NC[2];

    unsigned char Lx_White;
    unsigned char GaoWen2;
    unsigned char TongShuo;
    unsigned char Wifi;
    unsigned char SheShiDu;
    unsigned char ReGuan;
    unsigned char TbL;
    unsigned char Tds;
    unsigned char KeyChuShuiRed1;
    unsigned char KeyChuShuiWhite1;
    unsigned char COM4_1112[2];

    unsigned char KeyChangWenShui1;
    unsigned char KeyChangWenShui2;
    unsigned char KeyChangWenShui3;
    unsigned char KeyChangWenShui4;
    unsigned char KeyWenShui1;
    unsigned char KeyWenShui2;
    unsigned char KeyWenShui3;
    unsigned char KeyWenShui4;
    unsigned char KeyChuShuiRed2;
    unsigned char KeyChuShuiWhite2;
    unsigned char COM5_1112[2];

    unsigned char KeyNingMeng1;
    unsigned char KeyNingMeng2;
    unsigned char KeyNingMeng3;
    unsigned char KeyNingMeng4;
    unsigned char KeyLvCha1;
    unsigned char KeyLvCha2;
    unsigned char KeyLvCha3;
    unsigned char KeyLvCha4;
    unsigned char KeyChuShuiRed3;
    unsigned char KeyChuShuiWhite3;
    unsigned char COM6_1112[2];

    unsigned char KeyFeiShui1;
    unsigned char KeyFeiShui2;
    unsigned char KeyFeiShui3;
    unsigned char KeyFeiShui4;
    unsigned char KeyYunDingZhi1;
    unsigned char KeyYunDingZhi2;
    unsigned char KeyYunDingZhi3;
    unsigned char KeyYunDingZhi4;
    unsigned char KeyChuShuiRed4;
    unsigned char KeyChuShuiWhite4;
    unsigned char COM7_1112[2];

    unsigned char KeyTongShuo1;
    unsigned char KeyTongShuo2;
    unsigned char KeyTongShuo3;
    unsigned char KeyTongShuo4;
    unsigned char KeyShuiLiang1;
    unsigned char KeyShuiLiang2;
    unsigned char KeyShuiLiang3;
    unsigned char KeyShuiLiang4;
    unsigned char KeyChuShuiRed6;
    unsigned char KeyChuShuiWhite6;
    unsigned char COM8_NC[2];

} s_c8624_com_seg_t;
#endif
